home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / killdll / form1.frm < prev    next >
Text File  |  1995-05-08  |  1KB  |  58 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Kill DLL"
  4.    ClientHeight    =   1515
  5.    ClientLeft      =   1455
  6.    ClientTop       =   2190
  7.    ClientWidth     =   2595
  8.    Height          =   1920
  9.    Left            =   1395
  10.    LinkMode        =   1  'Source
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   1515
  13.    ScaleWidth      =   2595
  14.    Top             =   1845
  15.    Width           =   2715
  16.    Begin CommandButton Command1 
  17.       Caption         =   "Dump DLL"
  18.       Default         =   -1  'True
  19.       Height          =   315
  20.       Left            =   540
  21.       TabIndex        =   1
  22.       Top             =   1080
  23.       Width           =   1215
  24.    End
  25.    Begin TextBox Text1 
  26.       Height          =   315
  27.       Left            =   120
  28.       TabIndex        =   0
  29.       Top             =   600
  30.       Width           =   2355
  31.    End
  32.    Begin Label Label1 
  33.       Caption         =   "DLL Filename to unload"
  34.       Height          =   255
  35.       Left            =   120
  36.       TabIndex        =   2
  37.       Top             =   240
  38.       Width           =   2295
  39.    End
  40. End
  41. Sub Command1_Click ()
  42.     Dim dHndl%
  43.  
  44.     dHndl = LoadLibrary((text1.text))
  45.     If dHndl >= 32 Then
  46.         Do While GetModuleUsage(dHndl) > 0
  47.             FreeLibrary (dHndl)
  48.         Loop
  49.         MsgBox "DLL Dumped"
  50.     End If
  51.  
  52. End Sub
  53.  
  54. Sub Form_Load ()
  55.     text1.text = Command$
  56. End Sub
  57.  
  58.